package com.ssc.chain.tcfp.core.client;

/**
 * @author mingjian
 * @version 1.0
 * Create by 2025/7/10 17:11
 */

import lombok.Data;

import java.io.File;
import java.io.InputStream;

@Data
public class TcfpUploadRequest {
    private File file;
    private InputStream fileStream;
    private long fileLength;
    private String fileName;

    private String targetUrl;
    private String token;
    private String metadata;
    private String tenantId;
    private String identifier; // 断点恢复标识

    public boolean isStreamUpload() {
        return fileStream != null;
    }

    public String getFileNameSafe() {
        return fileName != null ? fileName : (file != null ? file.getName() : "unknown");
    }

}

